<script>
	import {mapState,mapMutations} from 'vuex'
	export default {
		
		computed: mapState(['hasLogin','uerInfo']),  
		onLaunch: function() {
			this.bindLogin(); 
		
	
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		},
		methods:{
			...mapMutations(['logout']),
						bindLogin(){
						this.logout();
						 if (this.hasLogin) { 
							 console.log(this.hasLogin);
						 } else {  
							 console.log(this.hasLogin);
							 uni.navigateTo({  
								 url: 'pages/login/login'
							 })  
							 
						 }  
			} 
		}
	}
</script>

<style>
	/*每个页面公共css */
	@import "./common/uni.css";
	@import "./common/global.css";
	@import "./common/icon.css";
	body{
		background-color: #f3f3f3;
	}
</style>
